﻿// Decompiled with JetBrains decompiler
// Type: 我的小工具.frmWebSite
// Assembly: 开发辅助工具, Version=1.0.0.1, Culture=neutral, PublicKeyToken=null
// MVID: F78E5980-5E94-4E46-ABDF-DC8C6CBF52AA
// Assembly location: K:\Tools\工具\开发辅助工具庆六一版\开发辅助工具2015-06-01\开发辅助工具.exe

using System;
using System.ComponentModel;
using System.Configuration;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Windows.Forms;

namespace 我的小工具
{
  public class frmWebSite : Form
  {
    public dp_WebSite WebSite = new dp_WebSite();
    private IContainer components = (IContainer) null;
    private Button button1;
    private Button button2;
    private Panel panel1;
    private Panel panel2;
    private GroupBox groupBox3;
    private Label label1;
    private TextBox txtRemark;
    private Label label9;
    private TextBox txtSitePath;
    private Label label10;
    private Label label16;
    private TextBox txtSiteName;
    private Label label11;
    private Label label12;
    private TextBox cboReg;
    private TextBox txtAss;
    private Label label17;
    private TextBox txtDBName;
    private Label label15;
    private TextBox txtServerName2;
    private Label label14;
    private TextBox cboUserName;
    private Label label13;
    private TextBox cboPwd;
    private LinkLabel linkLabel1;
    private Label label3;
    private Label label2;
    private TextBox txtCreater;
    private TextBox txtModifyDate;
    private Label label4;
    private TextBox txtSourceAdress;
    private Button button18;
    private Button button22;

    public frmWebSite()
    {
      this.InitializeComponent();
    }

    private void frmWebSite_Load(object sender, EventArgs e)
    {
      this.txtSiteName.Text = this.WebSite.SiteName;
      this.txtSitePath.Text = this.WebSite.SitePath;
      this.cboReg.Text = this.WebSite.RegName;
      this.txtAss.Text = this.WebSite.AppPool;
      this.txtDBName.Text = this.WebSite.DbName;
      this.txtServerName2.Text = this.WebSite.ServerName;
      this.cboUserName.Text = this.WebSite.UserId;
      this.cboPwd.Text = this.WebSite.Password;
      this.linkLabel1.Text = this.WebSite.SiteAddress;
      this.txtRemark.Text = this.WebSite.Remark;
      this.txtCreater.Text = this.WebSite.Creater;
      this.txtModifyDate.Text = !this.WebSite.ModifyDate.HasValue ? "" : this.WebSite.ModifyDate.Value.ToString("yyyy-MM-dd HH:mm:ss");
      this.txtSourceAdress.Text = this.WebSite.SourceAdress;
    }

    private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
    {
      new Process()
      {
        StartInfo = {
          FileName = "IEXPLORE.EXE",
          Arguments = this.linkLabel1.Text
        }
      }.Start();
    }

    private void button1_Click(object sender, EventArgs e)
    {
      this.WebSite.Remark = this.txtRemark.Text;
      this.DialogResult = DialogResult.OK;
    }

    private void button22_Click(object sender, EventArgs e)
    {
      string str = ConfigurationManager.AppSettings["SSMSPATH"];
      if (string.IsNullOrEmpty(str) && !File.Exists(str))
      {
        int num = (int) MessageBox.Show(str + "文件不存在,请打开Config文件重新配置！");
      }
      else if (this.txtServerName2.Text == "")
      {
        Process.Start(str);
      }
      else
      {
        string format = " -S {0} -d {1} -U {2} -P {3}";
        Process.Start(str, string.Format(format, (object) this.txtServerName2.Text, (object) this.txtDBName.Text, (object) this.cboUserName.Text, (object) this.cboPwd.Text));
      }
    }

    private void button18_Click(object sender, EventArgs e)
    {
      string str = ConfigurationManager.AppSettings["PROFILER"];
      if (string.IsNullOrEmpty(str) && !File.Exists(str))
      {
        int num = (int) MessageBox.Show(str + "文件不存在,请打开Config文件重新配置！");
      }
      else if (this.txtServerName2.Text == "")
      {
        Process.Start(str);
      }
      else
      {
        string format = " -S {0} -d {1} -U {2} -P {3}";
        Process.Start(str, string.Format(format, (object) this.txtServerName2.Text, (object) this.txtDBName.Text, (object) this.cboUserName.Text, (object) this.cboPwd.Text));
      }
    }

    protected override void Dispose(bool disposing)
    {
      if (disposing && this.components != null)
        this.components.Dispose();
      base.Dispose(disposing);
    }

    private void InitializeComponent()
    {
      this.button1 = new Button();
      this.button2 = new Button();
      this.panel1 = new Panel();
      this.panel2 = new Panel();
      this.groupBox3 = new GroupBox();
      this.linkLabel1 = new LinkLabel();
      this.label1 = new Label();
      this.txtRemark = new TextBox();
      this.label4 = new Label();
      this.label9 = new Label();
      this.txtSourceAdress = new TextBox();
      this.txtSitePath = new TextBox();
      this.label10 = new Label();
      this.label16 = new Label();
      this.txtSiteName = new TextBox();
      this.label11 = new Label();
      this.label12 = new Label();
      this.cboReg = new TextBox();
      this.txtAss = new TextBox();
      this.label17 = new Label();
      this.txtDBName = new TextBox();
      this.label3 = new Label();
      this.label2 = new Label();
      this.label15 = new Label();
      this.txtServerName2 = new TextBox();
      this.label14 = new Label();
      this.txtCreater = new TextBox();
      this.txtModifyDate = new TextBox();
      this.cboUserName = new TextBox();
      this.label13 = new Label();
      this.cboPwd = new TextBox();
      this.button18 = new Button();
      this.button22 = new Button();
      this.panel1.SuspendLayout();
      this.panel2.SuspendLayout();
      this.groupBox3.SuspendLayout();
      this.SuspendLayout();
      this.button1.Location = new Point(464, 6);
      this.button1.Name = "button1";
      this.button1.Size = new Size(75, 23);
      this.button1.TabIndex = 0;
      this.button1.Text = "确定";
      this.button1.UseVisualStyleBackColor = true;
      this.button1.Click += new EventHandler(this.button1_Click);
      this.button2.DialogResult = DialogResult.Cancel;
      this.button2.Location = new Point(561, 6);
      this.button2.Name = "button2";
      this.button2.Size = new Size(75, 23);
      this.button2.TabIndex = 1;
      this.button2.Text = "取消";
      this.button2.UseVisualStyleBackColor = true;
      this.panel1.Controls.Add((Control) this.button18);
      this.panel1.Controls.Add((Control) this.button22);
      this.panel1.Controls.Add((Control) this.button1);
      this.panel1.Controls.Add((Control) this.button2);
      this.panel1.Dock = DockStyle.Bottom;
      this.panel1.Location = new Point(0, 323);
      this.panel1.Name = "panel1";
      this.panel1.Size = new Size(660, 39);
      this.panel1.TabIndex = 2;
      this.panel2.Controls.Add((Control) this.groupBox3);
      this.panel2.Dock = DockStyle.Fill;
      this.panel2.Location = new Point(0, 0);
      this.panel2.Name = "panel2";
      this.panel2.Size = new Size(660, 323);
      this.panel2.TabIndex = 3;
      this.groupBox3.Controls.Add((Control) this.linkLabel1);
      this.groupBox3.Controls.Add((Control) this.label1);
      this.groupBox3.Controls.Add((Control) this.txtRemark);
      this.groupBox3.Controls.Add((Control) this.label4);
      this.groupBox3.Controls.Add((Control) this.label9);
      this.groupBox3.Controls.Add((Control) this.txtSourceAdress);
      this.groupBox3.Controls.Add((Control) this.txtSitePath);
      this.groupBox3.Controls.Add((Control) this.label10);
      this.groupBox3.Controls.Add((Control) this.label16);
      this.groupBox3.Controls.Add((Control) this.txtSiteName);
      this.groupBox3.Controls.Add((Control) this.label11);
      this.groupBox3.Controls.Add((Control) this.label12);
      this.groupBox3.Controls.Add((Control) this.cboReg);
      this.groupBox3.Controls.Add((Control) this.txtAss);
      this.groupBox3.Controls.Add((Control) this.label17);
      this.groupBox3.Controls.Add((Control) this.txtDBName);
      this.groupBox3.Controls.Add((Control) this.label3);
      this.groupBox3.Controls.Add((Control) this.label2);
      this.groupBox3.Controls.Add((Control) this.label15);
      this.groupBox3.Controls.Add((Control) this.txtServerName2);
      this.groupBox3.Controls.Add((Control) this.label14);
      this.groupBox3.Controls.Add((Control) this.txtCreater);
      this.groupBox3.Controls.Add((Control) this.txtModifyDate);
      this.groupBox3.Controls.Add((Control) this.cboUserName);
      this.groupBox3.Controls.Add((Control) this.label13);
      this.groupBox3.Controls.Add((Control) this.cboPwd);
      this.groupBox3.Location = new Point(10, 12);
      this.groupBox3.Name = "groupBox3";
      this.groupBox3.Size = new Size(635, 303);
      this.groupBox3.TabIndex = 37;
      this.groupBox3.TabStop = false;
      this.groupBox3.Text = "配置信息";
      this.linkLabel1.AutoSize = true;
      this.linkLabel1.Location = new Point(418, 24);
      this.linkLabel1.Name = "linkLabel1";
      this.linkLabel1.Size = new Size(125, 12);
      this.linkLabel1.TabIndex = 27;
      this.linkLabel1.TabStop = true;
      this.linkLabel1.Text = "Http://www.baidu.com";
      this.linkLabel1.LinkClicked += new LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
      this.label1.AutoSize = true;
      this.label1.Location = new Point(48, 184);
      this.label1.Name = "label1";
      this.label1.Size = new Size(41, 12);
      this.label1.TabIndex = 26;
      this.label1.Text = "备注：";
      this.txtRemark.Location = new Point(93, 181);
      this.txtRemark.MaxLength = 1000;
      this.txtRemark.Multiline = true;
      this.txtRemark.Name = "txtRemark";
      this.txtRemark.Size = new Size(532, 82);
      this.txtRemark.TabIndex = 25;
      this.label4.AutoSize = true;
      this.label4.Location = new Point(24, 78);
      this.label4.Name = "label4";
      this.label4.Size = new Size(65, 12);
      this.label4.TabIndex = 3;
      this.label4.Text = "源码地址：";
      this.label9.AutoSize = true;
      this.label9.Location = new Point(23, 51);
      this.label9.Name = "label9";
      this.label9.Size = new Size(65, 12);
      this.label9.TabIndex = 3;
      this.label9.Text = "站点目录：";
      this.txtSourceAdress.Cursor = Cursors.Hand;
      this.txtSourceAdress.ForeColor = Color.Blue;
      this.txtSourceAdress.Location = new Point(93, 74);
      this.txtSourceAdress.Name = "txtSourceAdress";
      this.txtSourceAdress.Size = new Size(535, 21);
      this.txtSourceAdress.TabIndex = 4;
      this.txtSitePath.Cursor = Cursors.Hand;
      this.txtSitePath.ForeColor = Color.Blue;
      this.txtSitePath.Location = new Point(92, 47);
      this.txtSitePath.Name = "txtSitePath";
      this.txtSitePath.ReadOnly = true;
      this.txtSitePath.Size = new Size(535, 21);
      this.txtSitePath.TabIndex = 4;
      this.label10.AutoSize = true;
      this.label10.Location = new Point(371, 24);
      this.label10.Name = "label10";
      this.label10.Size = new Size(41, 12);
      this.label10.TabIndex = 3;
      this.label10.Text = "站点：";
      this.label16.AutoSize = true;
      this.label16.Location = new Point(23, 24);
      this.label16.Name = "label16";
      this.label16.Size = new Size(65, 12);
      this.label16.TabIndex = 3;
      this.label16.Text = "站点名称：";
      this.txtSiteName.Location = new Point(92, 20);
      this.txtSiteName.Name = "txtSiteName";
      this.txtSiteName.ReadOnly = true;
      this.txtSiteName.Size = new Size(208, 21);
      this.txtSiteName.TabIndex = 4;
      this.label11.AutoSize = true;
      this.label11.Location = new Point(348, 105);
      this.label11.Name = "label11";
      this.label11.Size = new Size(65, 12);
      this.label11.TabIndex = 3;
      this.label11.Text = "应用程序：";
      this.label12.AutoSize = true;
      this.label12.Location = new Point(36, 105);
      this.label12.Name = "label12";
      this.label12.Size = new Size(53, 12);
      this.label12.TabIndex = 5;
      this.label12.Text = "注册表：";
      this.cboReg.Location = new Point(93, 101);
      this.cboReg.Name = "cboReg";
      this.cboReg.ReadOnly = true;
      this.cboReg.Size = new Size(208, 21);
      this.cboReg.TabIndex = 6;
      this.txtAss.Location = new Point(417, 101);
      this.txtAss.Name = "txtAss";
      this.txtAss.ReadOnly = true;
      this.txtAss.Size = new Size(208, 21);
      this.txtAss.TabIndex = 6;
      this.label17.AutoSize = true;
      this.label17.Location = new Point(335, 158);
      this.label17.Name = "label17";
      this.label17.Size = new Size(77, 12);
      this.label17.TabIndex = 21;
      this.label17.Text = "SaPassword：";
      this.txtDBName.Location = new Point(417, (int) sbyte.MaxValue);
      this.txtDBName.Name = "txtDBName";
      this.txtDBName.ReadOnly = true;
      this.txtDBName.Size = new Size(208, 21);
      this.txtDBName.TabIndex = 20;
      this.label3.AutoSize = true;
      this.label3.Location = new Point(24, 273);
      this.label3.Name = "label3";
      this.label3.Size = new Size(53, 12);
      this.label3.TabIndex = 19;
      this.label3.Text = "创建人：";
      this.label2.AutoSize = true;
      this.label2.Location = new Point(348, 273);
      this.label2.Name = "label2";
      this.label2.Size = new Size(65, 12);
      this.label2.TabIndex = 19;
      this.label2.Text = "修改时间：";
      this.label15.AutoSize = true;
      this.label15.Location = new Point(23, 158);
      this.label15.Name = "label15";
      this.label15.Size = new Size(65, 12);
      this.label15.TabIndex = 19;
      this.label15.Text = "UserName：";
      this.txtServerName2.Location = new Point(92, (int) sbyte.MaxValue);
      this.txtServerName2.Name = "txtServerName2";
      this.txtServerName2.ReadOnly = true;
      this.txtServerName2.Size = new Size(208, 21);
      this.txtServerName2.TabIndex = 18;
      this.label14.AutoSize = true;
      this.label14.Location = new Point(359, 131);
      this.label14.Name = "label14";
      this.label14.Size = new Size(53, 12);
      this.label14.TabIndex = 17;
      this.label14.Text = "DBName：";
      this.txtCreater.Location = new Point(93, 269);
      this.txtCreater.Name = "txtCreater";
      this.txtCreater.ReadOnly = true;
      this.txtCreater.Size = new Size(208, 21);
      this.txtCreater.TabIndex = 23;
      this.txtModifyDate.Location = new Point(417, 269);
      this.txtModifyDate.Name = "txtModifyDate";
      this.txtModifyDate.ReadOnly = true;
      this.txtModifyDate.Size = new Size(208, 21);
      this.txtModifyDate.TabIndex = 23;
      this.cboUserName.Location = new Point(92, 154);
      this.cboUserName.Name = "cboUserName";
      this.cboUserName.ReadOnly = true;
      this.cboUserName.Size = new Size(208, 21);
      this.cboUserName.TabIndex = 23;
      this.label13.AutoSize = true;
      this.label13.Location = new Point(11, 131);
      this.label13.Name = "label13";
      this.label13.Size = new Size(77, 12);
      this.label13.TabIndex = 15;
      this.label13.Text = "ServerName：";
      this.cboPwd.Location = new Point(417, 154);
      this.cboPwd.Name = "cboPwd";
      this.cboPwd.ReadOnly = true;
      this.cboPwd.Size = new Size(208, 21);
      this.cboPwd.TabIndex = 24;
      this.button18.Location = new Point(11, 6);
      this.button18.Name = "button18";
      this.button18.Size = new Size(82, 23);
      this.button18.TabIndex = 5;
      this.button18.Text = "PROFILER";
      this.button18.UseVisualStyleBackColor = true;
      this.button18.Click += new EventHandler(this.button18_Click);
      this.button22.Location = new Point(93, 6);
      this.button22.Name = "button22";
      this.button22.Size = new Size(82, 23);
      this.button22.TabIndex = 6;
      this.button22.Text = "打开SSMS";
      this.button22.UseVisualStyleBackColor = true;
      this.button22.Click += new EventHandler(this.button22_Click);
      this.AcceptButton = (IButtonControl) this.button1;
      this.AutoScaleDimensions = new SizeF(6f, 12f);
      this.AutoScaleMode = AutoScaleMode.Font;
      this.CancelButton = (IButtonControl) this.button2;
      this.ClientSize = new Size(660, 362);
      this.Controls.Add((Control) this.panel2);
      this.Controls.Add((Control) this.panel1);
      this.MaximizeBox = false;
      this.MinimizeBox = false;
      this.Name = "frmWebSite";
      this.ShowIcon = false;
      this.StartPosition = FormStartPosition.CenterParent;
      this.Text = "站点信息";
      this.Load += new EventHandler(this.frmWebSite_Load);
      this.panel1.ResumeLayout(false);
      this.panel2.ResumeLayout(false);
      this.groupBox3.ResumeLayout(false);
      this.groupBox3.PerformLayout();
      this.ResumeLayout(false);
    }
  }
}
